Auto merge of #3249 - matklad:workspace-profiles, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 4 Nov 2016 20:42:09 +0000 (13:42 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2016 20:42:09 +0000 (13:42 -0700)
Use a single profile set per workspace

This aims to close #3206.

I have not figured out how to do this 100% backward compatibly, that's why I want to discuss this separately, although a related PR (#3221) is already in flight.

The problem is this: suppose that you have a workspace with two members, A and B and that A includes a profiles section and B does not. Now, mentally `cd` inside B and run `cargo build`. Today, Cargo will use a default profile. We want it to use a profile from A. So here the silent behavior switch will inevitably occur :( Looks like we can't detect this situation.

So this PR just switches the behavior to always use root profiles, and to print a warning if a non-root package specifies profiles. Feel free to reuse it in any form for #3221 if that's convenient!

1  2 
src/cargo/ops/cargo_compile.rs
src/cargo/util/toml.rs

Simple merge
Simple merge